<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>季度统计</title>
  <style>
    *{
      margin: 0;
      padding: 0;
    }
    .box{
      width: 700px;
      height: 300px;
      display: flex;
      justify-content: space-around;
      align-items: end;
      margin: 0 auto;
      border-left: 1px solid pink;
      border-bottom: 1px solid pink;
      text-align: center;
    }
    .box>div{
      display: flex;
      width: 50px;
      flex-direction: column;
      justify-content: space-between;
      background-color: pink;
    }
    .box div span{
      margin-top: -20px;
    }
    .box div h4{
      width: 70px;
      margin-left: -10px;
      margin-bottom: -20px;
    }
  </style>
</head>
<body>
  <!-- <div class="box">
    <div style="height: 123px;">
      <span>123</span>
      <h4>第1季度</h4>
    </div>
    <div style="height: 123px;">
      <span>123</span>
      <h4>第1季度</h4>
    </div>
    <div style="height: 123px;">
      <span>123</span>
      <h4>第1季度</h4>
    </div>
    <div style="height: 123px;">
      <span>123</span>
      <h4>第1季度</h4>
    </div>
  </div> -->

  <script>
    //存储季度数据
    let arr = []
    //填入数据
    for(let i = 1;i <= 4; i++){
      arr.push(prompt(`请输入第${i}季度的数据:`))
    }
    //打印盒子开头
    document.write(`<div class="box">`)
      //打印盒子中间
      for(let i = 0; i < arr.length; i++){
        document.write(`<div style="height: ${arr[i]}px;">
          <span>${arr[i]}</span>
          <h4>第${i+1}季度</h4>
          </div>
          `)
      }

    document.write(`</div>`)
  </script>
</body>
</html>